import { HttpClient, WsConnection, WsServer } from "tsrpc";
import { ecs } from "../../../core/ecs/ECS";
import { serviceProto as HallServiceProto, ServiceType as ServiceTypeHall } from "../../../tsrpc/shared/protocols/HallServiceProto";
import { serviceProto as ServiceProtoRoom, ServiceType as ServiceTypeRoom } from "../../../tsrpc/shared/protocols/RoomServiceProto";
import { Collection } from "../../../core/collection/Collection";
import { Room } from "../../../module/room/Room";

/** 网关服务器数据 */
@ecs.register('RoomModel')
export class RoomModel extends ecs.Comp {
    /** 房间 websocket 服务器 */
    wssRoom: WsServer<ServiceTypeRoom> = null!;
    rooms:Map<number, Room> = new Map();
    /** 与匹配服务器连接的 HTTP 客户端 */
    hcMatch: HttpClient<ServiceTypeHall> = null!;

    /** 与匹配服务器的 WebSocket 连接对象 */
    //matchServerConn?: WsConnection<ServiceTypeRoom>;

    /** 房间对象集合 */
    //rooms: Collection<string, Room> = new Collection();

    reset(): void {

    }
}